package edu.sctu.practice.class01.fengleilin.assign03.test02;

/**
 * Created by fll on 2015/10/22.
 */

/**
 * 该类为Circle类的子类，并实现Comparable接口
 */
public class ComparableCircle extends Circle implements Comparable {

    public ComparableCircle(double r, double PI, double height) {
        super(r, PI, height);
    }

    /**
     * 比较圆的大小
     * @param o
     * @return
     */
    @Override
    public double compareTo(Object o) {

        double circleArea = PI * r * r;
        System.out.println(circleArea);
        return circleArea;
    }
}
